package com.springmvc.t11;

import com.springmvc.t11.config.WebConfig;
import com.springmvc.t11.config.WebFactory;
import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.startup.Tomcat;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;

import javax.servlet.Servlet;
import java.io.File;

public class ApplicationWeb {

	public static void main(String[] args) throws LifecycleException {

		AnnotationConfigWebApplicationContext web = new AnnotationConfigWebApplicationContext();
		web.register(WebConfig.class);
		web.refresh();
		WebFactory bean = web.getBean(WebFactory.class);
		bean.createServer();

	}
}
